Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

prime(0) → false
prime(s(0)) → false
prime(s(s(x))) → prime1(s(s(x)), s(x))
prime1(x, 0) → false
prime1(x, s(0)) → true
prime1(x, s(s(y))) → and(not(divp(s(s(y)), x)), prime1(x, s(y)))
divp(x, y) → =(rem(x, y), 0)

Q is empty.


QTRS
  ↳ DirectTerminationProof

Q restricted rewrite system:
The TRS R consists of the following rules:

prime(0) → false
prime(s(0)) → false
prime(s(s(x))) → prime1(s(s(x)), s(x))
prime1(x, 0) → false
prime1(x, s(0)) → true
prime1(x, s(s(y))) → and(not(divp(s(s(y)), x)), prime1(x, s(y)))
divp(x, y) → =(rem(x, y), 0)

Q is empty.

We use [23] with the following order to prove termination.

Recursive Path Order [2].
Precedence:
prime1 > [false, prime12] > [0, true, divp2] > [and2, =2, rem2]
prime1 > [false, prime12] > not1 > [and2, =2, rem2]
s1 > [false, prime12] > [0, true, divp2] > [and2, =2, rem2]
s1 > [false, prime12] > not1 > [and2, =2, rem2]